package com.sfang.common.base.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * Created by psalmody on 2016/8/8.
 */
public class RestListInfo<T>  implements Serializable {
    public RestListInfo(){

    }

    public RestListInfo(int status, String message) {
        this.status=status;
        this.msg=message;
        this.serverTime = new Date();
//        this.result = new ArrayList<T>();
    }

    public RestListInfo(boolean success, int status, String message) {
        this.success = success;
        this.status = status;
        this.msg = message;
        this.serverTime = new Date();
//        this.result = new ArrayList<T>();
    }

    private boolean success;
    /// <summary>
    /// 消息
    /// </summary>
    private String msg;

    /// <summary>
    /// 返回的结果代码
    /// </summary>
    private int status;

    /// <summary>
    /// 业务码
    /// </summary>
    private int businessCode;
    /// <summary>
    /// 服务器时间
    /// </summary>
    private Date serverTime;

    /// <summary>
    /// 结果数据
    /// </summary>
    private List<T> result;

    private int count;

    /**
     * 错误信息明细
     */
    private Object error;

    public String getMsg() {
        return this.msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public boolean getSuccess() {
        return this.success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public int getStatus() {
        return this.status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getBusinessCode() {
        return this.businessCode;
    }

    public void setBusinessCode(int businessCode) {
        this.businessCode = businessCode;
    }

    public Date getServerTime() {
        return this.serverTime;
    }

    public void setServerTime(Date serverTime) {
        this.serverTime = serverTime;
    }

    public int getCount() {
        return this.count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public List<T> getResult() {
        return this.result;
    }

    public void setResult(List<T> result) {
        this.result = result;
    }

    public Object getError() {
        return error;
    }

    public void setError(Object error) {
        this.error = error;
    }
}
